<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="../WEB-INF/templates/frontend.xhtml">
    <ui:param name="title" value="Edit settings"/>
    <ui:define name="content">
        <h2>User details</h2>
        <h:form>
            <h:inputHidden value="#{userController.user.id}" />
            <table border="0">
                <tr>
                    <td><h:outputLabel value="E-mail: "/></td>
                    <td><h:inputText value="#{userController.user.email}"/></td>
                </tr>
                <tr>
                    <td><h:outputLabel value="Name: "/></td>
                    <td><h:inputText value="#{userController.user.name}"/></td>
                </tr>
            </table>
            <h:commandButton value="Edit" action="#{userController.doEdit}"/>
        </h:form>
        <h2>Change password</h2>
        <h:form>
            <h:inputHidden value="#{userController.user.id}" />
            <table border="0">
                <tr>
                    <td><h:outputLabel value="New password: "/></td>
                    <td><h:inputSecret value="#{userController.user.password}" redisplay="false" /></td>
                </tr>
            </table>
            <h:commandButton value="Change" action="#{userController.doEditPassword}"/>
        </h:form>
    </ui:define>
</ui:composition>